package com.dingup.mock.dao.reading;


import com.dingup.mock.bean.base.ArticleOrder;
import com.dingup.mock.bean.reading.TsReadingArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by yanggavin on 16/3/10.
 */
@Mapper
public interface TsReadingArticleDAO {
    Boolean add(TsReadingArticle article);

    Boolean update(TsReadingArticle article);

    Boolean delete(Integer id);

    Boolean deleteByIdAndSubectName(@Param("id")Integer id,@Param("subjectName") String subjectName);

    TsReadingArticle get(@Param("subjectName")String subjectName, @Param("articleNum")Integer articleNum);

    TsReadingArticle getById(Integer id);

    List<TsReadingArticle> getList(String subjectName);

    Integer getArticleTotalNum(String subjectName);

    List<TsReadingArticle> getAll();

    //统计每套题对应的所有文章序号
    List<Map<String, Object>> getSubjectNameAndArticleNums();

    Boolean existArticle(TsReadingArticle article);
    List<TsReadingArticle> getAllSubjectName();

    List<ArticleOrder> getTPORealTestSubjectName();
}
